package game;

import AGFX.F3D.F3D;
import AGFX.F3D.Body.TF3D_Body;
import AGFX.F3D.Camera.TF3D_Camera;
import AGFX.F3D.Light.TF3D_Light;
import AGFX.F3D.Model.TF3D_Model;


public class TEditor {
	
	public TF3D_Camera		Camera;
	public TF3D_Body        landscape;
	public TF3D_Body		model;
	public TGrid			grid;
	public TF3D_Model 		cursor;
	

	public TEditor(){
		F3D.Worlds.CreateWorld("EDITOR");
		

		//F3D.Viewport.Clear(0f, 0f, 0f, 1f);
		
		this.Camera = new TF3D_Camera("Editor_Camera");
		this.Camera.SetPosition(0.0f, 1.0f,30f);

		this.Camera.ctype = F3D.CAMERA_TYPE_FPS;
		
		F3D.Cameras.Add(this.Camera);
		//F3D.Worlds.SetCamera(this.Camera);
	
		
		// Add light to scene
		TF3D_Light light = new TF3D_Light("light_0", 0);
		light.SetPosition(3, 3, 3);
		light.spot_constant_att = 0.001f;
		light.Enable();

		this.landscape = new TF3D_Body("EDITOR_PLANE");
		this.landscape.AssignMesh("abstract::airport.a3da");
		this.landscape.Enable();
		//this.landscape.SetScale(0.5f, 0.5f, 0.5f);
		this.landscape.SetPosition(1, 0, 0);
		this.landscape.CreateRigidBody(F3D.BULLET_SHAPE_TRIMESH, 0.0f);
		
		this.grid = new TGrid();
		
		this.cursor = new TF3D_Model("cursor");
		this.cursor.AssignMesh(F3D.Meshes.FindByName("abstract::cone.a3da"));

	}
	
}
